<div style="padding-top: 20px;padding-left: 20px;padding-bottom: 20px">
	<form  >
		<label>姓名：</label><input type="text" name="name"  id="tname" value="<%=name%>" />
		<label>年龄：</label><input type="text" name="age"  id="tage" value="<%=age%>" />
	</form>
	<div style="padding-left: 250px;padding-top: 10px">
		<input type="button" value="取消" onclick="cancel()" />
		<input type="button" value="提交" onclick="updateSubmit()" />
	</div>
<input type="text" value="<%=id%>" id="tId" style="display: none"></input>


</div>

<script type="text/javascript">
 	function updateSubmit(){
		$.post("/student/update",{name:$('#tname').val(),age:$('#tage').val(),id:parseInt($("#tId").val())},function(result,status){
			$("#dialog").dialog("close");
			$("#"+$("#tId").val()+" >td:eq(0)").html($('#tname').val());
			$("#"+$("#tId").val()+" >td:eq(1)").html($('#tage').val());
			alert(result.msg);

		});
 	}

 	function cancel(){
 		$("#dialog").dialog("close");
 	}
</script>



